home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 14
/
CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso
/
CUCD
/
Programming
/
Mesa-2.2
/
util
/
idproj.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
Text File
|
1996-08-26
|
462 b
|
25 lines
/* idproj.c */
/*
* Setup an identity projection such that glVertex(x,y) maps to
* window coordinate (x,y).
*/
void IdentityProjection( GLint x, GLint y, GLsizei width, GLsizei height )
{
glViewport( x, y, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( (GLdouble) x, (GLdouble) y,
(GLdouble) width, (GLdouble) height,
-1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
}